Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

868 fn:intersperse → fn:join, array:join($arrays, $separator) #1504

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ChristianGruen
Copy link
Contributor

Issue: #868

@ChristianGruen ChristianGruen added the Tests Needed Tests need to be written or merged label Oct 16, 2024
@michaelhkay
Copy link
Contributor

I'm not sure I understand the use case for making the second argument of string-join into a sequence.

@ChristianGruen
Copy link
Contributor Author

I'm not sure I understand the use case for making the second argument of string-join into a sequence.

It’s an alignment with intersperse/join; and I did not see a reason not to do it, as we already allow it to be an empty sequence.

@michaelhkay michaelhkay added the Revise PR has been discussed and substantive changes requested label Oct 22, 2024
@wendellpiez
Copy link

fn:chain-sequence() as an alternative name for fn:join() ?

@ChristianGruen
Copy link
Contributor Author

ChristianGruen commented Oct 24, 2024

I have done the following changes (Sorry for the repeated commits):

  • fn:string-join: reverted to accept at most one separator item.
  • fn:join: renamed to fn:sequence-join, mandatory separator argument.
  • array:join: Signature and equivalent XPath code changed to take charge of empty-sequence separators (thanks Reece).

@ChristianGruen ChristianGruen removed the Revise PR has been discussed and substantive changes requested label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tests Needed Tests need to be written or merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants